home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Pascal Super Library
/
Pascal Super Library (CW International)(1997).bin
/
LIBRARY
/
TSPA3460
/
TSUNTG.INT
< prev
next >
Wrap
Text File
|
1994-08-16
|
5KB
|
163 lines
{$B-,D-,F-,I+,N-,R-,S+,V+}
(*
Timo Salmi UNiT G
A Turbo Pascal unit of informative routines, Crt replacements, and
redirection.
All rights reserved 26-Nov-89
Updated 6-Dec-89, 20-Mar-90, 22-Jul-90, 1-Aug-90, 8-Aug-90, 27-Oct-91,
13-Jun-92, 19-Oct-92, 8-Nov-92, 26-Jul-93, 22-Jun-94, 16-Aug-94
This unit may be used and distributed freely for PRIVATE, NON-COMMERCIAL,
NON-INSTITUTIONAL purposes, provided it is not changed in any way, and
that a proper attribution is made. For ANY other usage, such as use in a
business enterprise or at a university, contact the author for the terms
of registration.
The units are under development. Comments and contacts are solicited. If
you have any questions, please do not hesitate to use electronic mail for
communication.
InterNet address: ts@uwasa.fi
The author shall not be liable to the user for any direct, indirect or
consequential loss arising from the use of, or inability to use, any unit,
program or file howsoever caused. No warranty is given that the units and
programs will work under all circumstances.
Timo Salmi
Professor of Accounting and Business Finance
Faculty of Accounting & Industrial Management; University of Vaasa
P.O. BOX 297, FIN-65101 Vaasa, Finland
16-Aug-94: Moved to the new TSUNTM
All the keyboard routines
26-Jul-93: Moved to TSUNTBOT
WARMBOOT
COLDBOOT
30-Jun-93: Added
ISRAMFN
8-Nov-92: Added
ACTDRVFN
MEDIAFN
19-Oct-92: Added
FLOPSTFN
ISUBSTFN
13-Jun-92: Added
GETSCAN
GETESCAN
27-Oct-91: Added
ISANSIFN
*)
unit TSUNTG;
(* ======================================================================= *)
interface
(* ======================================================================= *)
uses Dos
{$IFDEF VER40}
,TSUNT45
{$ENDIF}
;
(* =======================================================================
Informative routines
======================================================================= *)
(* Number of diskette drives on the system *)
function DRIVESFN : byte;
(* The name of the first diskette drive on the system *)
function FDRIVEFN : char;
(* Number of disk devices. Only for MsDos 3.+, else returns 0, harcoded *)
function DSKCNTFN : byte;
(* Is a media present in the given drive. Argument '0' can be used to
denote the default drive *)
function INDRIVFN (drive : char) : boolean;
(* Is a media a fixed disk. Takes the drive letter (case independent) as
the argument. Argument '0' can be used for the default drive *)
function FIXEDFN (drive : char) : boolean;
(* Get the floppy disk status. Is the floppy present and formatted.
For the status values see TSUNTG.TST procedure TEST16, or
interrupt $13 function $01 in Ralf Brown's inter32a.zip *)
function FLOPSTFN (drive : char) : integer;
(* Test whether a drive is a substituted drive, that is has been subjected
to the MsDos subst command. Requires a minumum of MsDos 3.1 *)
function ISUBSTFN (drive : char) : boolean;
(* What kind of a disk media is in a disk drive.
Takes the drive letter (case independent) as the argument.
Argument '0' can be used for the default drive.
For the returned values see TEST18 in TSUNTG.TST
*)
function MEDIAFN (drive : char) : byte;
(* Get the currently active floppy drive on one drive systems.
Returns the drive letter 'A' or 'B'.
For an error returns '0', for two drive systems returns '2'. *)
function ACTDRVFN : char;
(* Is a drive a ram probable disk
Network drivers and other special circumstances may interfere *)
function ISRAMFN (drive : char) : boolean;
(* Is a drive a CD-ROM with MSCDEX driver installed *)
function CDROMFN (drive : char) : boolean;
(* Get CD-ROM driver MSCDEX.EXE version *)
function MSCVERFN (drive : char) : word;
(* =======================================================================
Crt replacements and their derivates
======================================================================= *)
(* Set a 25*80 text mode and clear screen, no Crt unit required *)
procedure CLS;
(* Set a 25*40 text mode and clear screen, no Crt unit required *)
procedure CLS40;
(* As Turbo Pascal GoToYX but does not require the Crt unit *)
procedure GOATXY (x, y : integer);
(* As Turbo Pascal WhereX but does not require the Crt unit *)
function WHEREXFN : byte;
(* As Turbo Pascal WhereY but does not require the Crt unit *)
function WHEREYFN : byte;
(* Reverse the colors of an area.
This is slow. For fast screen routines see TSUNTA. *)
procedure REVAREA (x1, y1, x2, y2 : integer);
(* Returns whether ANSI.SYS or a similar screen driver has been loaded or not.
Use while in the text mode. Do not call not in the graphics modes.
Don't use the TP Crt unit in your program if you want ISANSIFN to work. *)
function ISANSIFN : boolean;
(* =======================================================================
Redirection
======================================================================= *)
(* Direct write and writeln to printer *)
procedure USEPRN;
(* Direct write and writeln to the screen *)
procedure USECON;